<html>
<head>
<link href="../../../Objects/sofa_white.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="contenu">
		
		<center><h3>Creation of a Pendulum (5/8)</h3></center>
		<div id="orangeText">Description</div>

		<p>Now we will create internal forces to add interactions between the particles of our mechanical object. </p>
		<p>The concept of Forces are handled in SOFA by components called <strong>ForceFields</strong>. We implemented numerous algorithms to simulate Mass Spring systems, Finite Elements, Rigid Bodies, etc. Again, there are examples available for these different types. In this tutorial, we will add a <strong>Spring</strong> between the two particles.</p>

		<div id="orangeText">Key points</div>
        
		<p>We will use a <strong>SpringForceField</strong> to model our spring. </p>

		<div id="tutorialAction"><p>Type "Spring" in the <strong>Filter</strong> textbox. You will see <strong>SpringForceField</strong> in two categories. Both are the same. Drag and drop the <strong>SpringForceField</strong> from either category over the <strong>FirstObject</strong> node. Double click the <strong>SpringForceField</strong> in the Modeler scene graph.</p>
        
		<p>Click on the<strong> Property 2/2</strong> tab. In the spring section, increase the <strong>0</strong>  to "1", and press <strong>Display the values</strong>. Then, press the <strong>Update</strong> button found in the bottom left corner of the window. </p></div>
        
        <p>The titles of the columns now describe all the parameters needed to create a spring: two indices (Index1, Index2) corresponding to the particles attached by the spring, a stiffness coefficient (Ks), a damping coefficient (Kd), and the rest length of the spring (L).</p>

		<p><div id="tutorialAction">Type the values "0", "1", "100", "5" and "1" into the columns <strong>Index1, Index2, Ks, Kd</strong> and <strong>L</strong> respectively. Press <strong>OK</strong> to return to the Modeler. Run the scene in SOFA, and animate.</div></p>

		<br><div id="orangeText">Results</div>

		<p>The two particles are now linked together by a spring. The second particle continues to fall because of gravity, but a spring, displayed by a green line, keeps them close. (Note: If you can't see the green line, make sure "Force Fields" is selected in the View tab in SOFA)</p>
		<p>We have modeled a very basic pendulum with only 5 components. Take some time to customize this scene. Try modifying the parameters of the spring, the position and parameters of the particles of the mechanical object, or adding particles or springs.</p>



                <br><center><h3><a href="3_Pendulum.scn">Previous</a> ____________  <a href="5_Pendulum.scn">Next</a></center></h3>
	</div>
</body>
</html>
